import {useDispatch, useSelector} from "react-redux";

const Page1 = () => {
    const {num} = useSelector((state: RootState) => ({
        num: state.userInfoReducer.num
    }))
    const dispatch = useDispatch()
    const changeNum = () => {
        dispatch({type: 'addRank'})
    }
    return (
        <div>
            <div>page1</div>
            <p>{num}</p>
            <button onClick={changeNum}>啊啊啊</button>
        </div>
    )
}
export default Page1